<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户中心</title>
<link type="text/css" href="<%=basePath %>css/person.css" rel="stylesheet">
<link type="text/css" href="<%=basePath%>css/buttons.css" rel="stylesheet" />

</head>
<body>
<input type="hidden" id="basePath" value="<%=basePath %>">
<input type="hidden" id="pid" value="${currUser.id}">
<input type="hidden" id="puserName" value="${currUser.username}">
<input type="hidden" id="pemail" value="${currUser.email}">
<jsp:include page="/WEB-INF/common/header.jsp"></jsp:include>
<div class="outline">
		<div class="info_div">
			<div>
				<div class="head_message">
					<span>光谱分析系统 用户中心</span>
				</div>
			</div>
			<div class="content">
				<div class="changename">
					<div class="inner_div">
						<span class="tag_span">更改用户名：</span>
						<input class="input_class" type="text" id="usernameText" value="${currUser.username}" name="user.username">
						<span id="nameValidMsg" class="message"></span>
					</div>
				</div>
				<div class="changeps">
					<div class="inner_div inner_ps">
						<div>
							<span class="tag_span">更改密码：</span>
							<input class="input_class" type="password" id="pw1">
							<span id="span1" class="inner_input" style="margin-top:20px">请输入原始密码</span>
							<span id="msgSpan1" class="message"></span>
						</div>
						<div>
							<input class="input_class" type="password" id="pw2">
							<span id="span2" class="inner_input" style="right:67%;margin-top:22px;">请输入新密码</span>
							<span id="msgSpan2" class="message"></span>
						</div>
						<div>
							<input class="input_class" type="password" id="pw3">
							<span id="span3" class="inner_input" style="margin-top:24px;">重新输入新密码</span>
							<span id="msgSpan3" class="message"></span>
						</div>
					</div>
				</div>
			
				<div class="changeemail">
					<div class="inner_div inner_em">
						<span class="tag_span">更改邮箱：</span>
						<input class="input_class" type="text" id="userEmailText" value="${currUser.email}">
						<span id="EmlValidMsg" class="message">(非必填，可用于找回密码)</span>
					</div>
				</div>
			</div>
			
			<div class="but_div">
				<input type="button" class="button button-primary button-rounded button-small" value="保存修改" id="saveSubmit">
			</div>
			
			<div class="save_div">
				<span id="saveSpan"></span>
			</div>
		</div>
		
</div>
</body>
<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-2.0.3.js"></script>
<script type="text/javascript" src="<%=basePath %>js/person.js"></script>
</html>